<docs>
  ## 职业介绍服务微信端登陆页面
</docs>
<template>
  <form class="login" @submit.prevent="formSubmit">
    <h1 class="title">登录</h1>
    <div class="weui-cells_form">
      <div class="weui-cell">
        <div class="weui-cell__hd">
          <label for="" class="weui-label">统一社会信用代码</label>
        </div>
        <div class="weui-cell__bd">
          <input type="text" class="weui-input" v-model="form.tyshxydm"
          placeholder="请输入统一社会信用代码" maxlength="18">
        </div>
      </div>
      <div class="weui-cell">
        <div class="weui-cell__hd">
          <label for="" class="weui-label">单位名称</label>
        </div>
        <div class="weui-cell__bd">
          <input type="text" class="weui-input" v-model="form.dwmc"
          placeholder="请输入单位名称" maxlength="18">
        </div>
      </div>
    </div>
    <div class="weui-btn-area login-btn">
      <button class="weui-btn weui-btn_primary">登录</button>
    </div>
  </form>
</template>
<script>

import viewNum from 'common/js/configuration'
export default {
  name: 'login',
  data() {
    return {
      //   这个是后台用的  91110106093087343E 这个是测试用的
      form: {
        tyshxydm: '911100001021481963',
        dwmc:'东方美高美（北京）国际酒店有限公司'
      }
    };
  },
  methods: {
    formSubmit() {
      this.$loading = true;
      this.$http.post('/login/bdlogin', this.form).then(() => {
        window.location.href = './index.html';
      }).catch(() => {
      }).finally(() => {
        this.$loading = false;
      });
    }
  }
};
</script>
<style scoped lang="scss">
  @import '~common/scss/var.scss';
  .login {
    padding: $padding-base 0;
    .title {
      text-align: center;
      font-size: $font-size-ultra;
      font-weight: normal;
      padding: $padding-base * 2 0;
      margin-bottom: $margin-base;
    }
    .weui-cells_form {
      background-color: #fff;
    }
    .login-btn {
      margin-top: 240px;
    }
  }
</style>
